"""with open 打开文件将文件读取的内容放入到 man、other列表里"""

man = []
other = []
try:
    the_file = open("E:/ter.txt")

    for each_line in the_file:
        try:
            (role, line_spoken) = each_line.split(":", 1)
            line_spoken = line_spoken.strip()
            # print(role, end='')
            # print(' said:', end='')
            # print(line_spoken, end='')
            if role == "Man":
                man.append(line_spoken)
            elif role == "Other":
                other.append(line_spoken)
        except ValueError:
            pass

    the_file.close()
except IOError:
    print("Not find File")

print(man)
print(other)
